package com.meevle.business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	import com.meevle.vo.SetVO;
	import com.meevle.vo.SlotVO;
	import com.meevle.vo.UserVO;
	
	import mx.rpc.IResponder;
	
	public class RecorderDelegate 
	{
		private var responder:IResponder;
		private var service:Object;
		
		public function RecorderDelegate(responder:IResponder)
		{
			this.responder = responder;
			this.service = ServiceLocator.getInstance().getRemoteObject("recorderService");
		}
		
		public function startRecord(user:UserVO, m_set:SetVO, slot:SlotVO) : void {
			var call:Object = service.startRecord(user.username, m_set.name, slot.index);
			call.addResponder(responder);
		}
		
		public function stopRecord(user:UserVO, m_set:SetVO, slot:SlotVO) : void {
			var call:Object = service.stopRecord(user.username, m_set.name, slot.index, slot.name);
			call.addResponder(responder);
		}
	}
}